Optimal. Leaf size=48 \[ \frac {a^2 \log (\cosh (c+d x))}{d}-\frac {a b \text {sech}^2(c+d x)}{d}-\frac {b^2 \text {sech}^4(c+d x)}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4138, 266, 43} \[ \frac {a^2 \log (\cosh (c+d x))}{d}-\frac {a b \text {sech}^2(c+d x)}{d}-\frac {b^2 \text {sech}^4(c+d x)}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 266
Rule 4138
Rubi steps
\begin {align*} \int \left (a+b \text {sech}^2(c+d x)\right )^2 \tanh (c+d x) \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\left (b+a x^2\right )^2}{x^5} \, dx,x,\cosh (c+d x)\right )}{d}\\ &=\frac {\operatorname {Subst}\left (\int \frac {(b+a x)^2}{x^3} \, dx,x,\cosh ^2(c+d x)\right )}{2 d}\\ &=\frac {\operatorname {Subst}\left (\int \left (\frac {b^2}{x^3}+\frac {2 a b}{x^2}+\frac {a^2}{x}\right ) \, dx,x,\cosh ^2(c+d x)\right )}{2 d}\\ &=\frac {a^2 \log (\cosh (c+d x))}{d}-\frac {a b \text {sech}^2(c+d x)}{d}-\frac {b^2 \text {sech}^4(c+d x)}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.14, size = 81, normalized size = 1.69 \[ \frac {\text {sech}^4(c+d x) \left (a \cosh ^2(c+d x)+b\right )^2 \left (4 a^2 \cosh ^4(c+d x) \log (\cosh (c+d x))-4 a b \cosh ^2(c+d x)-b^2\right )}{d (a \cosh (2 (c+d x))+a+2 b)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.42, size = 1180, normalized size = 24.58 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.14, size = 159, normalized size = 3.31 \[ -\frac {12 \, a^{2} d x - 12 \, a^{2} \log \left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right ) + \frac {25 \, a^{2} e^{\left (8 \, d x + 8 \, c\right )} + 100 \, a^{2} e^{\left (6 \, d x + 6 \, c\right )} + 48 \, a b e^{\left (6 \, d x + 6 \, c\right )} + 150 \, a^{2} e^{\left (4 \, d x + 4 \, c\right )} + 96 \, a b e^{\left (4 \, d x + 4 \, c\right )} + 48 \, b^{2} e^{\left (4 \, d x + 4 \, c\right )} + 100 \, a^{2} e^{\left (2 \, d x + 2 \, c\right )} + 48 \, a b e^{\left (2 \, d x + 2 \, c\right )} + 25 \, a^{2}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{4}}}{12 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.16, size = 48, normalized size = 1.00 \[ -\frac {b^{2} \mathrm {sech}\left (d x +c \right )^{4}}{4 d}-\frac {a b \mathrm {sech}\left (d x +c \right )^{2}}{d}-\frac {a^{2} \ln \left (\mathrm {sech}\left (d x +c \right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.48, size = 55, normalized size = 1.15 \[ \frac {a b \tanh \left (d x + c\right )^{2}}{d} + \frac {a^{2} \log \left (\cosh \left (d x + c\right )\right )}{d} - \frac {4 \, b^{2}}{d {\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )}^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.69, size = 182, normalized size = 3.79 \[ \frac {4\,\left (a\,b-b^2\right )}{d\,\left (2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1\right )}-a^2\,x+\frac {8\,b^2}{d\,\left (3\,{\mathrm {e}}^{2\,c+2\,d\,x}+3\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}+1\right )}-\frac {4\,b^2}{d\,\left (4\,{\mathrm {e}}^{2\,c+2\,d\,x}+6\,{\mathrm {e}}^{4\,c+4\,d\,x}+4\,{\mathrm {e}}^{6\,c+6\,d\,x}+{\mathrm {e}}^{8\,c+8\,d\,x}+1\right )}+\frac {a^2\,\ln \left ({\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+1\right )}{d}-\frac {4\,a\,b}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.67, size = 63, normalized size = 1.31 \[ \begin {cases} a^{2} x - \frac {a^{2} \log {\left (\tanh {\left (c + d x \right )} + 1 \right )}}{d} - \frac {a b \operatorname {sech}^{2}{\left (c + d x \right )}}{d} - \frac {b^{2} \operatorname {sech}^{4}{\left (c + d x \right )}}{4 d} & \text {for}\: d \neq 0 \\x \left (a + b \operatorname {sech}^{2}{\relax (c )}\right )^{2} \tanh {\relax (c )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________